package com.cloudkinto.service.detective;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.DefectiveDo;
import com.cloudkinto.service.detective.vo.StartPickReq;
import com.cloudkinto.service.detective.vo.pick.BatchReq;
import com.cloudkinto.service.detective.vo.pick.PickInfoRes;
import com.cloudkinto.service.detective.vo.shelf.SubmitShelfInitRes;
import com.cloudkinto.vo.defective.DefectiveAddReq;
import com.cloudkinto.vo.defective.DefectivePageDto;
import com.cloudkinto.vo.defective.DefectiveUpdateReq;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * service接口
 * </p>
 *
 * @author hua
 * @since 2024-12-11
 */
public interface DefectiveService extends IService<DefectiveDo> {

    SingleResult addInit();

    Object add(DefectiveAddReq req, Long userId, Long companyId, Long tenantId);


    Object update(DefectiveUpdateReq updateVo, Long userId, Long companyId, Long tenantId);

    void submit(BatchReq req, Long userId, Long companyId, Long tenantId);

    void cancel(BatchReq req, Long userId, Long companyId);

    Object detail(Map<String, Object> map);

    SingleResult pageInit(Long tenantId, String source);

    List<DefectivePageDto> getList(Map<String, Object> map);

    PageResult getListPage(Map<String, Object> map);

    List<Map<String, Object>> statusStatistics(Map<String, Object> map);

    void startPicking(StartPickReq req, Long userId, Long whId, Long tenantId);

    PickInfoRes queryPickingInfo(Long id, Long userId, Long whId, Long tenantId);

    int submitPicking(PickInfoRes req, Long userId, Long whId, Long tenantId);

    SubmitShelfInitRes submitShelfInit(Long id, Long userId, Long whId, Long tenantId);

    int submitShelf(SubmitShelfInitRes req, Long userId, Long whId, Long tenantId);

    void submitOut(StartPickReq req, Long userId, Long whId, Long tenantId);

    void printPick(Map<String, Object> map, HttpServletResponse response) throws Exception;
}
